//
//  PlayScene.h
//  MinusTheBox
//
//  Created by Chi Ho Chiu on 15/4/12.
//  Copyright 2012 Individual. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"

#import "PlayLayer.h"
#import "HistorySteps.h"
#import "Box2DArray.h"
#import "GameManager.h"

@interface PlayScene : CCScene <PlayLayerDelegate>
{
    PlayLayer *layer;
	Box2DArray *numberArray;
	EGameState gameState;
	int maxStep;
	int currentStep;
	
	HistorySteps *historySteps;
}
@property (nonatomic, retain) PlayLayer *layer;
@property (nonatomic, retain) Box2DArray *numberArray;
@property (assign) EGameState gameState;
@property (assign) int maxStep;
@property (assign) int currentStep;	//0 for initiale
@property (nonatomic, retain) HistorySteps *historySteps;

#pragma mark - Init
-(void) loadLevel;

#pragma mark - Core Logic Flow
-(BOOL) processMinusInColumn:(int)col row:(int)row;	//Return YES if there's interation
-(BOOL) processExplodeZero;
-(BOOL) processFall;
-(BOOL) processChain;
-(void) completeLevel;
-(void) onStepCompleted;	//Fire when the whole step movement completed

#pragma mark - Button Clicked Logic
-(void) useHint;
-(void) retryLevel;
@end
